package com.dsjy.yf.address.config.base;

public enum CommonEnum implements BaseErrorInfoInterface {
    // 数据操作错误定义
    SUCCESS(0, "成功!"),

    PARAM_ERROR(2, "参数异常"),
    USER_ERROR(3, "账号密码错误"),
    NO_TOKEN(4, "无token,请重新登录"),
    NO_AUTHORIZATION(401, "未经授权"),
    NO_USER(5, "账号不存在,请重新登录"),
    TOKEN_EXPIRED(6, "token已过期"),

    FILE_NULL(8,"文件不能为空"),
    FILENAME_NULL(9, "文件名不能为空"),
    ADD_ERROR(10,"添加失败" ),

    CLIENT_ERROR(402,"用户端错误"),

    SERVER_ERROR(500,"系统错误"),
    UNKNOWN_ERROR(501, "未知错误"),
    //密码解密失败
    PASSWORD_DECRYPT_ERROR(502,"密码解密失败"),
    FASSWORD_ERROR(503,"密码格式非法"),
    ACCESS_ERROR(504,"权限不足"),
    AUTHENTICATION_ERROR(505,"认证失败,账号或密码错误"),
    THIRD_PARTY_ERROR(506,"调用第三方服务出错");





    /**
     * 错误码
     */
    private Integer resultCode;

    /**
     * 错误描述
     */
    private String resultMsg;

    CommonEnum(Integer resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }

    @Override
    public Integer getResultCode() {
        return resultCode;
    }

    @Override
    public String getResultMsg() {
        return resultMsg;
    }

}